#!/usr/bin/env python
# -*-coding:utf-8-*-
# File    : conftest.py
# Date    : 2021-03-31
# Author  : Tom.Lee

import pytest
from selenium import webdriver

@pytest.fixture(scope="session")
def browser():
    driver = webdriver.Chrome()
    driver.maximize_window()
    driver.delete_all_cookies()
    yield driver
    driver.quit()

@pytest.fixture(scope='function', autouse=True)
def clear_cookes(browser):
    yield
    browser.delete_all_cookies()